import yaml


if __name__ == '__main__':
    with open('./yamlTest.yaml', mode='r', encoding='utf-8') as f:
        yamlConf = yaml.load(f.read(), Loader=yaml.FullLoader)
    print(yamlConf['kwargs'])

    kwargs = {list(sub_dict.keys())[0]: list(sub_dict.values())[0] for sub_dict in yamlConf['kwargs']}
    print(kwargs)